<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="/common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>预算定制</title>
<%@include file="/common/meta.jsp"%>
<%@include file="/common/validator.jsp"%>
<style type="text/css">
.budgetItem {
	width: 90px;
	height: 20px;
	border: 0px;
	color: green;
	font-weight: bold;
	text-align: right;
	margin: 0px;
	padding: 2px;
}

.showBorder {
	width: 90px;
	height: 20px;
	border: 0px; border-bottom : 1px solid red;
	color: green;
	text-align: right;
	font-weight: bold;
	margin: 0px;
	padding: 2px;
	border-bottom: 1px solid red;
}

.budgetTable {
	margin: auto;
	border-top: 1px solid #000000;
	border-left: 1px solid #000000;
}

.budgetTable tr td {
	height: 30px;
	padding: 2px;
	border-bottom: 1px solid #000000;
	border-right: 1px solid #000000;
	border-bottom: 1px solid #000000;
}

.budgetTable tr th {
	background-color: #ECECEC;
	height:30px;
 	font-weight: bold;
 	font-size:13px;
 	text-align: center;
	border-bottom: 1px solid #000000;
	border-right: 1px solid #000000;
	font-family: sans-serif;
}

#noBorder {
	border: 0px;
}

.errorMsg {
	width: 500px;
	height: 100px;
	color: red;
	text-align: left;
	padding: 20px 5px;
	border: 1px solid #CCC;
}
</style>
</head>
<body>
	<div style="margin: 5px; font-family: sans-serif; font-size: 14px; text-align: left;">
	  <table class="budgetTable" cellpadding="0" cellspacing="0">
	    <tr>
	      <th colspan="6" class="title">预算审核状态</th>
	    </tr>
	    <tr>
	      <th width="40">No.</th>
	      <th width="150">审核人</th>
	      <th width="140">审核日期</th>
	      <th width="100">审核状态</th>
	      <th width="422">审核意见</th>
	    </tr>
	    <s:iterator value="model.topFlow.nodes" var="node">
	    <tr>
	      <td align="center">${node.orderId}</td>
	      <td>
	        <s:if test="#attr.node.auditor == null">
	          <s:if test="#attr.node.auditorNames == null">
	            <i>财务</i>
	          </s:if>
	          <s:else>
	          	&nbsp;<i>${node.auditorNames}</i>
	          </s:else>
	        </s:if>
	        <s:else>
	          &nbsp;${node.auditor.name}
	        </s:else>
	      </td>
	      <td>&nbsp;<s:date name="#attr.node.audDate" format="yyyy/MM/dd HH:mm"/></td>
	      <td align="center">
		    <s:if test='#attr.node.status == "nopass"'>
		      <span style="color: red;">未通过</span>
		    </s:if>
		    <s:elseif test='#attr.node.status == "pass"'>
		      <span style="color: green;">通过</span>
		    </s:elseif>
		    <s:else>
		      <span style="color: silver;">未审核</span>
		    </s:else>&nbsp;
	      </td>
	      <td>&nbsp;${node.descn}</td>
	    </tr>
	    </s:iterator>
	  </table>
	</div>
  <div style="margin: 5px;">
  <table class="budgetTable" cellpadding="0" cellspacing="0" style="border-top: 2px solid; margin-top: 5px;">
    <tr>
      <th width="352">项目名称 </th>
      <th width="200">项目周期 </th>
      <th width="100">预算定制日期</th>
      <th width="100">预算定制人</th>
      <th width="100">预算额</th>
    </tr>
    <s:if test="model.project != null">
    <tr>
      <td style="color: navy;">&nbsp;
        <b>${model.project.name}</b>&nbsp;/&nbsp;
        ${model.project.projectType.name}
      </td>
      <td style="color: navy;"><s:date name="model.project.startTime" format="yyyy年MM月dd日"/>&nbsp;-&nbsp;<s:date name="model.project.endTime" format="yyyy年MM月dd日"/>&nbsp;</td>
      <td style="color: navy; ">&nbsp;
        <s:date name="model.createTime" format="yyyy年MM月dd日"/>
      </td>
      <td style="color: navy; ">&nbsp;${model.creater.name}</td>
      <td style="color: red; font-family: sans-serif; font-size: 14px;" align="right">
        ${model.amount}&nbsp;&yen;&nbsp;
      </td>
    </tr>
    </s:if>
  </table>
  <table class="budgetTable" cellpadding="0" cellspacing="0">
      <tr>
        <th width="70">科目编号</th>
        <th width="180">科目名称</th>
        <th width="100">预算金额</th>
        <th width="99">第1次追加</th>
        <th width="100">第2次追加</th>
        <th width="100">第3次追加</th>
        <th width="100">第4次追加</th>
        <th width="100">最终金额</th>
      </tr>
      <s:iterator value="model.proItemBudgets" var="pib">
        <tr>
          <td>
            ${pib.item.code}
            <input type="hidden" name="pibIds" value="${pib.id}">
          </td>
          <td>${pib.item.name}</td>
          <td align="center">
            <span class="budgetItem">${pib.amount}</span>
          </td>
          <td align="center">
            <span class="budgetItem">${pib.add1th}</span>
          </td>
	      <td align="center">
	        <span class="budgetItem">${pib.add2th}</span>
	      </td>
	      <td align="center">
	        <span class="budgetItem">${pib.add3th}</span>
	      </td>
	      <td align="center">
	        <span class="budgetItem">${pib.add4th}</span>
	      </td>
	      <td align="right" style="color: red; font-size: 14px; font-family: sans-serif;">
	        ${pib.finalAmount}&nbsp;&yen;&nbsp;</td>
        </tr>
      </s:iterator>
  </table>
  </div>
</body>
</html>